#!/usr/bin/swipl -g test -t halt -s

:- use_module('prolog_syntax/prolog_ast_parser.plg').

test :-
   consult('main.plg'),
   main,

   findall(X, build_ast_to_term('tmp/sample.cpp', X), Ast_bag),
   %findall(X, build_ast_to_term('tests/9.cpp', X), Ast_bag),
   length(Ast_bag, L),
   assertion(L = 1),
   [Ast] = Ast_bag,

   open('./tmp/ast_as_term.plg', write, S), format(S, '~q~n', Ast), close(S),
   assertion(prolog_ast_parser:prolog_parse_term(Ast)).
   %prolog_ast_parser:prolog_parse_term(Ast).

